package com.bckj.fastboot.core.extra.relational;

import org.springframework.data.mapping.context.AbstractMappingContext;
import org.springframework.data.mapping.model.Property;
import org.springframework.data.mapping.model.SimpleTypeHolder;
import org.springframework.data.util.TypeInformation;

/**
 * RelationalMappingContext2
 *
 * @author wfc
 **/
public class RelationalMappingContext extends AbstractMappingContext<RelationalPersistentEntity<?>, RelationalPersistentProperty> {
    @Override
    protected <T> RelationalPersistentEntity<?> createPersistentEntity(TypeInformation<T> typeInformation) {
        return new RelationalPersistentEntity<>(typeInformation);
    }

    @Override
    protected RelationalPersistentProperty createPersistentProperty(Property property, RelationalPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder) {
        return new RelationalPersistentProperty(property, owner, simpleTypeHolder);
    }
}
